extends "../calxJS_Hide/calxJS_Hide.gd"
func _init():
	pass
func _extInit():
	._extInit()
	chaName = "水星诺"                   # 角色的名称
	attCoe.atkRan = 2                 # 攻击距离
	attCoe.maxHp = 4                  # 最大生命（每点代表112.5基础数值，取整数，下同）
	attCoe.atk = 2                    # 攻击力（每点代表8.5）
	attCoe.mgiAtk = 4                 # 魔法攻击（每点代表13.7）
	attCoe.def = 3                    # 物理防御（每点代表15）
	attCoe.mgiDef = 3                 # 魔法防御（每点代表16.6）
	atkEff = "atk_dang" 
	xb = "水"
	lv = 1    
	addSkillTxt("[高速水弹]<先发>攻击距离自己最远的敌方亚比，造成120%法强的水系魔法伤害[CD:5]")
	addCdSkill("shuidan",7)

func _onBattleStart():
	._onBattleStart()
	shuidan()

func _castCdSkill(id):
	._castCdSkill(id)
	if id == "shuidan":
		shuidan()

func shuidan():
	var chas = getAllChas(1)
	chas.sort_custom(self,"sort")
	for i in range(1):
		if i >= chas.size() : break
		var cha:Chara = chas[i]
		sd(cha)

func sd(cha):
	var d:Eff = newEff("sk_feiDang",sprcPos)
	d._initFlyCha(cha)
	yield(d,"onReach")
	typeHurtCha(cha,att.mgiAtk*1.2,Chara.HurtType.MGI,Chara.AtkType.SKILL)

func sort(a,b):
	return cellRan(a.cell,cell) > cellRan(b.cell,cell)